import Router from '@koa/router';

import AuthController from './controllers/auth';
import UserController from './controllers/user';

const router = new Router();

// auth相关路由
router.post('/auth/login', AuthController.login);

// users相关路由
router.get('/users', UserController.listUsers);
router.get('/users/:uid', UserController.queryUser);
router.put('/users/:id', UserController.updateUser);
router.delete('/users/:id', UserController.deleteUser);
router.post('/user/update', UserController.updateUser)

export default router;